var lastMenu = 'menuPpal';
var wikimapiaEsCategories = [];

window.addEvent('domready', function() {
    tickmapOL.setMapDiv('map');
    tickmapOL.initMap();
    wikimapiaCategories.getAll('ES', function(err, categories) {
        if (!err) {
            categories.each(function(category) {
                wikimapiaEsCategories.push(category);
            });
        }
    });
});

function hideAllMenues() {
    $$('.menu').each(function (element) {
        element.setStyle('display', 'none');
    });
}

function showMenu(menu) {
    if ($(menu).getStyle('display') == 'none') {
        hideAllMenues();
        $(menu).setStyle('display', 'block');
        lastMenu = menu;
    } else {
        hideAllMenues();
    }
}

function showMenuDiv() {
    showMenu(lastMenu);
}